<?php
/**
 * Created by PhpStorm.
 * User: zhangrxiang
 * Date: 2018/5/2
 * Time: 15:36
 */

$ids = [1, 2, 3, 4, 5];
$str_ids = implode(", ", $ids);
echo $str_ids . PHP_EOL;

$str = "select * from test where id in ({$str_ids})";
echo $str . PHP_EOL;

echo "select * from help_keyword where help_keyword_id in (1, 2, 3, 4, 5)" . PHP_EOL;
echo "select * from help_keyword where help_keyword_id in ({$str_ids})" . PHP_EOL;

$str = "[\"173\",\"189\",\"190\",\"191\"]";

print_r(json_decode($str));

echo PHP_EOL;
echo "------------------------------------".PHP_EOL;
print_r(json_decode(''));
echo "------------------------------------".PHP_EOL;
